import request from '@/utils/request'
const prefix = '/md_sys_menu'

export function getAdminMenuList(data) {
  return request({
    url: `${prefix}/getAdminMenuList`, method: 'post', data
  })
}

export function getUserMenuList(data) {
  return request({
    url: `${prefix}/getUserMenuList`, method: 'post', data
  })
}

export function getMenuLangList(data) {
  return request({
    url: `${prefix}/getMenuLangList`, method: 'post', data
  })
}

export function getMenuAllList(data) {
  return request({
    url: `${prefix}/getMenuAllList`, method: 'post', data
  })
}

export function getMenuTreeList(data) {
  return request({
    url: `${prefix}/getMenuTreeList`, method: 'post', data
  })
}

export function createMenu(data) {
  return request({
    url: `${prefix}/createMenu`, method: 'post', data
  })
}

export function updateMenu(data) {
  return request({
    url: `${prefix}/updateMenu`, method: 'post', data
  })
}

export function deleteMenu(id) {
  return request({
    url: `${prefix}/deleteMenu/${id}`, method: 'delete'
  })
}
